package mististore;

import java.io.IOException;
import javax.servlet.http.*;

@SuppressWarnings("serial")
public class ServletDespachador extends HttpServlet
{
	public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException
	{
		resp.setContentType("text/plain");
		if(req.getParameter("destino")!=null)
			//resp.sendRedirect(req.getParameter("destino"));/
			//resp.sendRedirect("/hola.html");
			//resp.setHeader( "Location", "/hola.jsp?registrarse=true" );
			//resp.getWriter().println("Te voy a despachar a ... "+req.getParameter("destino"));
			//resp.sendRedirect(resp.encodeRedirectURL("/sfds.jsp"));
			resp.sendRedirect(resp.encodeRedirectURL("/search.jsp"));

		else
			resp.getWriter().println("No tengo a donde despacharte!");
	}
}
